package cn.edu.zucc.personplan.util;

import java.sql.Connection;

public class DBUtil {
//	private static final String jdbcUrl="jdbc:mysql://localhost:3306/booklib";
//	private static final String dbUser="root";
//	private static final String dbPwd="zucc";

//	private static final String jdbcUrl="jdbc:mysql://localhost:3306/plan?useSSL=false&serverTimezone=GMT";
	private static final String jdbcUrl = "jdbc:mysql://localhost:3307/plan?useSSL=false&serverTimezone=GMT";
	private static final String dbUser = "root";
	private static final String dbPwd = "123";

	static {
		try {
			Class.forName("com.mysql.jdbc.Driver");
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public static Connection getConnection() throws java.sql.SQLException {
		return DBPool.getInstance().getConnection();
//		return java.sql.DriverManager.getConnection(jdbcUrl, dbUser, dbPwd);
	}
}
